package cn.shentianlan.mapper;


import cn.shentianlan.criteria.UserCriteria;
import cn.shentianlan.domain.dto.UserDTO;
import cn.shentianlan.domain.entity.User;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author 陈俊源
 * @Description TODO
 * @Date 2021/4/7
 * @Version 1.0
 */
@Repository
public interface UserMapper {

    void saveUser(User user);

    void updateUser(User user);

    User getUserById(Long id);

    List<User> findUserByCriteria(UserCriteria criteria);

    User login(User user);

    /**
     * 获取数据量
     * @return
     */
    Integer getCount(UserCriteria criteria);

    void deleteUserById(Long id);

    User getUserByUsername(String username);
}
